//计算数组的个数 
var names = ['刘备','关羽','张飞'];
console.log(names.length);//3 计算数组长度
names[names.length] = '马超';
names[names.length] = '赵云';
console.log(names);